#pragma once

#include "Light_Point.h"
#include <SFML\Graphics.hpp>
#include "Player.h"
#include "RaiderBulletHandler.h"



class raider {
public:
	raider();
	~raider();

	void Initialize(sf::RenderWindow* win, Player* player, RaiderBulletHandler* raiderBulletHandler, ltbl::Light_Point* muzzleFlash, sf::Texture* image);
	void Update();
	void attack_player();
	void attack_ship();
	void Cleanup();

	void Spawn(float xPos, float yPos);
	bool IsBusy();
	int WeaponType();
	void Destroy();
	sf::FloatRect GetRect();
	int m_health;
	float distanceX;
	float distanceY;
	float distanceXship;
	float distanceYship;
	float distanceXplayer;
	float distanceYplayer;
	float distancePlayer;
	float distanceShip;
	
	sf::Vector2f raiderPos;
	sf::Sprite* m_sprite;
	Animation* m_animation;

	sf::Clock* m_clock;
	sf::Clock* m_shootClock;

	bool playerDown;
	

private:
	sf::RenderWindow* m_renderWindow;
	ltbl::Light_Point* m_muzzleFlash;
	sf::Texture* m_image;
	sf::Time timeSinceLastFrame;
	sf::Time m_timer;
	bool clockRestarted;
	sf::Time m_shootTimer;
	float playerAngle;
	float shipAngle;
	int typeChance;

	Player* m_player;

	float speed;

	bool m_isBusy;
	int m_weaponType;

	sf::Sprite* m_legs;
	RaiderBulletHandler* m_raiderBulletHandler;

	
};

